import 'package:fish_redux/fish_redux.dart';
import '../model/order_view_model.dart';
import '../../../app_files.dart';

class OrderResultViewState implements Cloneable<OrderResultViewState> {
  List<OrderConfigModel> items;
  CheckListItemModel userInfo;

  UserGasInfo gasInfo;
  String workerName;
  List orderPhoto = [];
  var orderSignPhoto;

  int orderStatus;

  bool isDetail = false;
  bool isNormal = true;

  TextEditingController selfFixContentController = TextEditingController();
  List repairPhotos = [];

  @override
  OrderResultViewState clone() {
    return OrderResultViewState()
      ..items = items
      ..userInfo = userInfo
      ..orderPhoto = orderPhoto
      ..orderSignPhoto = orderSignPhoto
      ..isDetail = isDetail
      ..selfFixContentController = selfFixContentController
      ..repairPhotos = repairPhotos
      ..workerName = workerName
      ..orderStatus = orderStatus
      ..gasInfo = gasInfo
      ..isNormal = isNormal;
  }
}

OrderResultViewState initState(Map<String, dynamic> args) {
  return OrderResultViewState()
    ..userInfo = args['info']
    ..items = args['items']
    ..gasInfo = args['gasInfo']
    ..isDetail = args['items'] == null;
}
